﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Furion.Core
{
    public interface IAuthorizationManager
    {
        /// <summary>
        /// 获取用户 Id
        /// </summary>
        /// <returns></returns>
        long UserId { get; }

        bool IsAuthenticated { get; }

        string Name { get; }

        /// <summary>
        /// 获取用户信息
        /// </summary>
        User User { get; }

        /// <summary>
        /// 检查授权
        /// </summary>
        /// <param name="resourceId"></param>
        /// <returns></returns>
        bool CheckPermisionn(string resourceId);
    }
}
